package com.example.demo.dao.lxy;

import com.example.demo.entity.Role_User;
import com.example.demo.entity.User;
//import java.sql.Timestamp;
import java.sql.Date;
import java.util.List;
import org.apache.ibatis.annotations.*;

@Mapper
public interface RoleUserDao {
    @Select("select * from system_role_user")
    public List<Role_User> findAll();
    @Select("select * from system_role_user where sys_user_id=#{userid}")
    public List<Role_User> findByid(int userid);
    @Insert("insert into system_role_user(sys_user_id,sys_role_id)  values (#{userid,jdbcType=VARCHAR},#{roleid,jdbcType=VARCHAR})")
    public int insertUser(@Param("userid") int userid,@Param("roleid") int roleid);
    @Delete("delete from system_role_user where sys_user_id=#{userid}")
    public int delectUser(int userid);
    @Update("update system_role_user set sys_role_id=#{roleid,jdbcType=VARCHAR} WHERE sys_user_id=#{userid}")
    public int upadeUser(@Param("userid") int userid,@Param("roleid") int roleid);
    }
